#ifndef __IFME_ALARM__
#define __IFME_ALARM__

namespace ifme
{
	enum check_type_t
	{
		CHK_NOTHING		= 0,
		CHK_FROM_IMAGE	= 1,
		CHK_CALLER		= 2,
		CHK_STACK_PIVOT = 4,
		CHK_SIM_FLOW	= 8,
		CHK_FROM_STACK	= 16,
		CHK_PROT_STACK	= 32,
	};

	static HANDLE hEvent = NULL;

	static void _alert_thread()
	{
		BOOL fok = WaitForSingleObject(hEvent,-1);
		MessageBoxA( 0, "Exploitation detected!", "ALARM", MB_OK );
		ExitProcess(-1);
	}

	static void on_exploit_detected( check_type_t type )
	{
		SetEvent(hEvent);
		ExitProcess(-1);
	}

};

#endif